<?php
class Messenger{
    
    public static function StatusWarning($message){
        return '
            <div class="nNote nWarning hideit">
                <p><strong>WARNING: </strong>' . $message . '</p>
            </div>
            ';
    }
    
    public static function StatusSuccess($message){
        return '
           <div class="nNote nSuccess hideit">
                <p><strong>SUCCESS: </strong>' . $message . '</p>
            </div>
            ';
    }
    
    public static function StatusError($message){
        return '
           <div class="nNote nFailure hideit">
                <p><strong>ERROR: </strong>' . $message . '</p>
            </div>
            ';
    }
    
    public static function StatusInformation($message){
        return '
           <div class="nNote nInformation hideit">
                <p><strong>INFORMATION: </strong>' . $message . '</p>
            </div>
            ';
    }
    
    
    
    public static function SendMessage($message = null, $type = null){
        if ($message == null || $message == "")
            return null;
        $type = ($type == null) ? "WARNING" : $type;
        switch ($type){
            case "WARNING":
                return Messenger::StatusWarning($message);
                break;
            case "SUCCESS":
                return Messenger::StatusSuccess($message);
                break;
            case "ERROR":
                return Messenger::StatusError($message);
                break;
            case "INFO":
                return Messenger::StatusInformation($message);
                break;
            default:
                return Messenger::StatusWarning($message);
                break;
        }
            
    }
}
?>
